package com.hsgene.consumables.constant;

public enum ConsumablesApplyStatus {

    /**
     * 耗材申请枚举
     */
    SHIP_REFUSE(0, "发放拒绝"),
    WAITE_APPROVAL(1, "待审批"),
    WAITE_UPDATE(2, "待修改"),
    WAITE_SHIP(3, "待发放"),
    WAITE_SEND(4, "待寄送"),
    WAITE_SIGNING(5, "待签收"),
    FINISHED(6, "已完成"),
    UNDEFINED(0, "UNDEFINED");

    ConsumablesApplyStatus(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static ConsumablesApplyStatus getEnum(int code) {
        for (ConsumablesApplyStatus status : values()) {
            if (status.status == code) {
                return status;
            }
        }
        return UNDEFINED;
    }

    private int status;
    private String desc;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
